package com.dbdata.move.model;

// Generated cafuc by Hibernate Tools 4

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Subject generated by hbm2java
 */
@Entity
@Table(name = "subject")
public class Subject implements java.io.Serializable {

	private Long id;
	private AirplaneSeries airplaneSeries;
	private SubjectType subjectType;
	private String subjectName;
	private boolean isTechnologyClass;
	private String subjectAttribute;
	private Long userId;
	private Integer subjectSort;
	private Set<WorkOrderDetail> workOrderDetails = new HashSet<WorkOrderDetail>(
			0);
	private Set<StudentResitDetail> studentResitDetails = new HashSet<StudentResitDetail>(
			0);
	private Set<PlanTopicSubject> planTopicSubjects = new HashSet<PlanTopicSubject>(
			0);
	private Set<TopicSubject> topicSubjects = new HashSet<TopicSubject>(0);
	private Set<PlanRecordSubject> planRecordSubjects = new HashSet<PlanRecordSubject>(
			0);

	public Subject() {
	}

	public Subject(AirplaneSeries airplaneSeries, boolean isTechnologyClass) {
		this.airplaneSeries = airplaneSeries;
		this.isTechnologyClass = isTechnologyClass;
	}

	public Subject(AirplaneSeries airplaneSeries, SubjectType subjectType,
			String subjectName, boolean isTechnologyClass,
			String subjectAttribute, Long userId, Integer subjectSort,
			Set<WorkOrderDetail> workOrderDetails,
			Set<StudentResitDetail> studentResitDetails,
			Set<PlanTopicSubject> planTopicSubjects,
			Set<TopicSubject> topicSubjects,
			Set<PlanRecordSubject> planRecordSubjects) {
		this.airplaneSeries = airplaneSeries;
		this.subjectType = subjectType;
		this.subjectName = subjectName;
		this.isTechnologyClass = isTechnologyClass;
		this.subjectAttribute = subjectAttribute;
		this.userId = userId;
		this.subjectSort = subjectSort;
		this.workOrderDetails = workOrderDetails;
		this.studentResitDetails = studentResitDetails;
		this.planTopicSubjects = planTopicSubjects;
		this.topicSubjects = topicSubjects;
		this.planRecordSubjects = planRecordSubjects;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AIRPLANE_SERIES", nullable = false)
	public AirplaneSeries getAirplaneSeries() {
		return this.airplaneSeries;
	}

	public void setAirplaneSeries(AirplaneSeries airplaneSeries) {
		this.airplaneSeries = airplaneSeries;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "SUBJECT_TYPE")
	public SubjectType getSubjectType() {
		return this.subjectType;
	}

	public void setSubjectType(SubjectType subjectType) {
		this.subjectType = subjectType;
	}

	@Column(name = "SUBJECT_NAME", length = 90)
	public String getSubjectName() {
		return this.subjectName;
	}

	public void setSubjectName(String subjectName) {
		this.subjectName = subjectName;
	}

	@Column(name = "IS_TECHNOLOGY_CLASS", nullable = false)
	public boolean isIsTechnologyClass() {
		return this.isTechnologyClass;
	}

	public void setIsTechnologyClass(boolean isTechnologyClass) {
		this.isTechnologyClass = isTechnologyClass;
	}

	@Column(name = "SUBJECT_ATTRIBUTE", length = 20)
	public String getSubjectAttribute() {
		return this.subjectAttribute;
	}

	public void setSubjectAttribute(String subjectAttribute) {
		this.subjectAttribute = subjectAttribute;
	}

	@Column(name = "USER_ID")
	public Long getUserId() {
		return this.userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	@Column(name = "SUBJECT_SORT")
	public Integer getSubjectSort() {
		return this.subjectSort;
	}

	public void setSubjectSort(Integer subjectSort) {
		this.subjectSort = subjectSort;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "subject")
	public Set<WorkOrderDetail> getWorkOrderDetails() {
		return this.workOrderDetails;
	}

	public void setWorkOrderDetails(Set<WorkOrderDetail> workOrderDetails) {
		this.workOrderDetails = workOrderDetails;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "subject")
	public Set<StudentResitDetail> getStudentResitDetails() {
		return this.studentResitDetails;
	}

	public void setStudentResitDetails(
			Set<StudentResitDetail> studentResitDetails) {
		this.studentResitDetails = studentResitDetails;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "subject")
	public Set<PlanTopicSubject> getPlanTopicSubjects() {
		return this.planTopicSubjects;
	}

	public void setPlanTopicSubjects(Set<PlanTopicSubject> planTopicSubjects) {
		this.planTopicSubjects = planTopicSubjects;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "subject")
	public Set<TopicSubject> getTopicSubjects() {
		return this.topicSubjects;
	}

	public void setTopicSubjects(Set<TopicSubject> topicSubjects) {
		this.topicSubjects = topicSubjects;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "subject")
	public Set<PlanRecordSubject> getPlanRecordSubjects() {
		return this.planRecordSubjects;
	}

	public void setPlanRecordSubjects(Set<PlanRecordSubject> planRecordSubjects) {
		this.planRecordSubjects = planRecordSubjects;
	}

}
